package pre.liuxl.blog.service;

import pre.liuxl.blog.DTO.CommentDTO;
import pre.liuxl.blog.entity.UserArticle;

import java.util.List;

/**
 * Created by liuxuanlong on 2018/6/24.
 */
public interface UserArticleService {
    void saveUserArticle(Integer userId, String headline, String articleClass, String content);

    List<UserArticle> findFirstTenOrderByCreateDate();

    List<UserArticle> findFirstFiveOrderByCreateDate();

    List<UserArticle> findFirstFiveOrderByPraiseNum();

    UserArticle findById(Integer id);

    List<CommentDTO> findByArticleId(Integer articleId);

    void saveComment(Integer articleId, Integer userId, String content);
}
